package com.ai.dmc.index.common.data;

/**
 * 公共常量类
 * @author sikong.chen
 *
 */
public interface PubConstant {
	public static final String SYSTEM_CODE = "system:idx";
	
	public static final String SQL_IDS = SYSTEM_CODE + ":sqlIds";
    /*
     * 关注类型(1:关注，2：取消关注)
     */
    public static final String INDEX_ATTEN_TYPE = "1";
    public static final String INDEX_CANCEL_TYPE = "2";
    /*
     * 1：存在，2：不存在
     */
    public static final String EXIST_FLAG = "1";
    public static final String EXIST_NOT_FLAG = "2";
    /*
     * 分割标识
     */
    public static final String PART_FLAG ="~!~";
    /*
     * 是否需要分割(1：需要   2：不需要)
     */
    public static final String IS_PART_FLAG ="1";
    /*
     * 指标主表名称
     */
    public static final String IDX_MASTER_TABLE_NAME ="td_idx_index_info";
    /*
     * 指标主表别名
     */
    public static final String IDX_TABLE_OTHER_NAME ="index_info";
    
    /*
     * 是否读维度表 (1:是 0：否)
     */
    public static final String IS_READ_TABLE_FLAG ="1";
    /*
     * 形如 yyyy-MM-dd 日期时间格式字符串长度
     */
    public static final int YEAR_MONTH_DAY_LENGTH =10;
    
    /*
     * 形如 yyyyMMdd 日期时间格式字符串长度
     */
    public static final int YEAR_MONTH_DAY_LEN = 8;
    
    /*
     * 形如 yyyy-MM 日期时间格式字符串长度
     */
    public static final int YEAR_MONTH_LENGTH =7;
    
    /*
     * 形如 yyyyMM 日期时间格式字符串长度
     */
    public static final int YEAR_MONTH_LEN = 6;
    
    /*
     * 形如 yyyy 日期时间格式字符串长度
     */
    public static final int YEAR_LENGTH = 4;

    /*
     *  连接分隔符(-)
     */
    public static final String CONNECT_SEPARATOR = "-";
    
     /*
      * 同比环比数值类型 (1)
      */
    public static final String SAME_LINK_NUMBER = "1";
    
    /*
     * 排序字段 -- 关注时间
     */
    public static final String FOLLOW_TIME_CODE_ORDER = "1";
    public static final String FOLLOW_TIME_FIELD_ORDER = "followTime";
    /*
     * 排序字段 -- 同比
     */
    public static final String SAME_CODE_ORDER = "2";
    public static final String SAME_FIELD_ORDER = "sameIndexData";
    /*
     * 排序字段 -- 环比
     */
    public static final String LINK_CODE_ORDER = "3";
    public static final String LINK_FIELD_ORDER = "linkIndexData";
    /*
     * 维度不匹配时，指标当前值、环比、同步  显示  “无值”
     */
    public static final String INDEX_NO_DATA = "无值";
    public static final String INDEX_NO_DATA_NUMBER = "-999";
    
    public static final String INDEX_NOT_DATA = "-";
    public static final String INDEX_NOT_DATA_NUMBER = "-998";
    /*
     *  竖线分隔符(|)
     */
    public static final String VERTIC_SEPARATOR = "\\|";
    public static final String VERTIC_SEPARATOR_PART = "|";
    
    /*
     *  冒号分割符(:)
     */
    public static final String COLON_SEPARATOR = "\\:";
    public static final String COLON_SEPARATOR_PART = ":";
    
    /*
     * 逗号(,)
     */
    public static final String COMMA_SEPARATOR = ",";
    /*
     * 空白("")
     */
    public static final String COLON_EMPTY = "";
    /*
     * 统计周期 （日、日累计） Code
     */
    public static final String DATA_CYCLE_DAY = "1";
    public static final String DATA_CYCLE_DAYS = "2";
    
    /*
     * 统计周期 （月、月累计） Code
     */
    public static final String DATA_CYCLE_MONTH = "3";
    public static final String DATA_CYCLE_MONTHS = "4";
    
    /*
     * 场景监控统计周期(日) Code
     */
    public static final String DATA_MONITOR_CYCLE_DAY = "1";
    
    /*
     * 场景监控统计周期(月) Code
     */
    public static final String DATA_MONITOR_CYCLE_MONTH = "2";
    
    /*
     * 场景监控统计周期(年) Code
     */
    public static final String DATA_MONITOR_CYCLE_YEAR = "3";
    
    /*
     * etl时间(日，月，年)
     * yyyy-MM-dd HH:mm:ss(24小时制)
     */
    public static final String ETL_TIME_DAY = "08:00";
    public static final String ETL_TIME_DAY_FORMAT = "HH:mm";
    public static final String ETL_TIME_MONTH = "01 08:00";
    public static final String ETL_TIME_MONTH_FORMAT = "dd HH:mm";
    public static final String ETL_TIME_YEAR = "0101 08:00";
    public static final String ETL_TIME_YEAR_FORMAT = "MMdd HH:mm";
    /*
     * 需要分页
     */
    public static final String NEED_PAGE_FLAG = "1";
    /*
     * 排名分析时需要增加"排名"列
     */
    public static final String INDEX_RANK_COLU_NAME = "排名";
    /*
     * 对比分析分需要增加"统计值"列
     */
    public static final String INDEX_COMPARE_COLU_NAME_ONE = "统计值";
    /*
     * 对比分析时需要增加"对比值"列
     */
    public static final String INDEX_COMPARE_COLU_NAME_TWO = "对比值";
    /*
     * 对比分析时需要增加"增量"列
     */
    public static final String INDEX_COMPARE_COLU_NAME_THREE = "增量";
    /*
     * 对比分析时需要增加"增幅"列
     */
    public static final String INDEX_COMPARE_COLU_NAME_FOUR = "增幅";
    /*
     * 对比分析时需要增加"占比"列
     */
    public static final String INDEX_STRUCT_COLU_NAME = "占比";
    
    
    /*
     * 敏感级别
     */
    public static final String SENSE_LEVEL_OPEN = "1"; // 公开

    public static final String SENSE_LEVEL_FORBIDEN = "2"; // 禁止

    public static final String SENSE_LEVEL_APPORVE = "3";// 审批
    
    public static final String SUPER_PRIVILEGE = "SUPER";// 超级权限
    
    public static final String DIMENSION_PRIVILEGE = "DIMENSION";// 超级权限
    /*
     * 是否级联维度(是：1,否：2)
     */
    public static final String LINK_DIM_TAG = "1";

    /*
     * 版本号开始数(1.01)
     */
    public static final String VERSION_CODE_START = "1.00";

    /*
     * 版本号累加基数(0.01)
     */
    public static final String VERSION_CODE_NUMBER = "0.01";
    
    /*
     *  指标单位百分比
     */
    public static final String INDEX_UNIT_CODE_PERCENT = "2";
    
    /*
     * 指标新建或修改的类型
     */
    public static final String INDEX_UPDATE_OR_SAVE_TYPE = "2";
    /*
     * 指标数据表开始字符串
     */
    public static final String INDEX_DATA_TABLE_NAME_START = "td_idx_";
    /*
     * 添加目录分类返回值 returnCode
     */
    public static final String ATTEN_FOLDER_NAME_REPEAT = "2";
    public static final String ATTEN_FOLDER_NAME_SUCCESS = "1";
    public static final String ATTEN_FOLDER_NAME_FAIL = "3";
    /*
     * 添加场景监控返回值 returnCode
     */
    public static final String ATTEN_MONSE_NAME_REPEAT = "2";
    public static final String ATTEN_MONSE_NAME_SUCCESS = "1";
    public static final String ATTEN_MONSE_NAME_FAIL = "3";
    
    /**
     * 添加监控场景分类返回值 returnCode
     */
    public static final String ATTEN_MONSE_TYPE_NAME_REPEAT = "2";
    public static final String ATTEN_MONSE_TYPE_NAME_SUCCESS = "1";
    public static final String ATTEN_MONSE_TYPE_NAME_FAIL = "3";
    
    /*
     * 校验返回值
     */
    public static final String REPEAT_CODE = "2";
    public static final String SUCCESS_CODE = "1";
    /*
     * 目录树级别code
     */
    public static final String FOLDER_LEVEL_CODE_ONE= "1";
    public static final String FOLDER_LEVEL_CODE_TWO= "2";
    public static final String FOLDER_LEVEL_CODE_THREE= "3";
    /*
     * 无需生成
     */
    public static final String INDEX_DATE_RANGE_NOT ="3";
    
    
    /*
     *  时间维度编码
     */
    public static final String TIMEDIMCODE = "-1";
    /*
     *  年、月、日时间类型(中文)
     */
    public static final String TIMEDAY = "日";
    public static final String TIMEMONTH = "月";
    public static final String TIMEYEAR = "年";

    /*
     * 年、月、日时间类型(英文)
     */
    public static final String DAY = "day";
    public static final String MONTH = "month";
    public static final String YEAR = "year";
    /*
     * 同一时间字段名
     */
    public static final String STATISTIME = "Statis_Date";

    /*
     * 数据库中默认为空的替换码
     */
    public static final String SQLNULL = "'-'";

    /*
     *  排序字符串
     */
    public static final String RANKSQL = "rank";

    /*
     *  算术运算符
     */
    public static final String MULTIPLY = "×";
    public static final String DIVIDE = "÷";
    /*
     * 组装报表前缀名
     */
    public static final String ASSEMBLE_REPORT_SUFFIX_NAME = "vd_rpt_";
    /*
     *  合计、排序、平均值中文名
     */
    public static final String TOTAL = "合计";
    public static final String RANK = "排位";
    public static final String AVG = "平均值";
    
    public static final String TIMEAPPEND = "000000";
    //展示图形
    public static final String BAR_STANDARD = "101";//标准柱状图
    public static final String PIE_STANDARD = "201";//标准饼图
    //指标类型
    public static final String IDX_CALC = "1"; //计算
    public static final String IDX_BASE = "0"; //基本
    
    //指标位置
    public static final String POS_CROSS = "cross";
    public static final String POS_SINGLE = "single";
    //发布报表状态
    public static final String RPT_CODE = "1";//正常
    
    //指定报表列数
    public static final int COLUNM_NUM = 100;
    /*
     * 指标失效期前30天  即将失效
     */
    public static final int NEAR_INDEX_EXPIRE = 30; 
    public static final String NEAR_INDEX_EXPIRE_CODE = "2"; 
    /*
     * 指标已经失效
     */
    public static final int ALREADY_INDEX_EXPIRE = 0;   
    
    /*
     * 获取指标基本ID的key值
     */
    public static final String INDEX_BASE_ID_KEY = "indexBaseId"; 
    /*
     * 获取指标暂存单ID的key值
     */
    public static final String INDEX_SAVE_ID_KEY = "indexSaveId"; 
    /*
     * 获取指标ID的key值
     */
    public static final String INDEX_ID_KEY = "indexId"; 
    /*
     * 获取指标标签ID的key值
     */
    public static final String INDEX_TAG_ID_KEY = "indexTagId"; 
    /*
    * 获取指标关注分类ID的key值
    */
   public static final String INDEX_ATTEN_FOLDER_ID_KEY = "indexAttenFolderId"; 
    /*
     * 获取指标目录ID的key值
     */
    public static final String INDEX__FOLDER_ID_KEY = "indexFolderId"; 
    
    /*
     * 获取监控场景ID的key值
     */
    public static final String INDEX_MONITOR_ID_KEY = "indexMonitorId";
    
    /**
     * 获取监控场景类别ID的key值
     */
    public static final String INDEX_MONITOR_TYPE_KEY = "indexMonitorTypeId";
    
    /*
     * 修改指标时保存版本
     */
    public static final String SAVE_VERSION_CODE = "1"; 
    
    /*
     * 查询结果为字符串null
     */
    public static final String RESULT_NULL = "null"; 
    
    
    
    /*
     * 报表类型(1:模板创建，2：指标组装)
     */
    public static final String RPT_DEVELOP = "1";
    public static final String INDEX_PACK = "2";
	
    /*
     * 关注类型(1:关注，2：取消关注)
     */
    public static final String RPT_ATTEN_TYPE = "1";
    public static final String RPT_CANCEL_TYPE = "2";
    
    /*
     * 时间周期类型
     */
    //日
    public static final String RPT_CYCLE_CODE_DAY = "11";
    //日区间
    public static final String RPT_CYCLE_CODE_DAY_RANGE = "12";
    //周
    public static final String RPT_CYCLE_CODE_WEEK = "13";
    //月
    public static final String RPT_CYCLE_CODE_MONTH = "14";
    //月区间
    public static final String RPT_CYCLE_CODE_MONTH_RANGE = "15";
    //季
    public static final String RPT_CYCLE_CODE_SEASON = "16";
    //半年
    public static final String RPT_CYCLE_CODE_HALFYEAR = "17";
    //年
    public static final String RPT_CYCLE_CODE_YEAR = "18";
    
    /*
     * 下拉控件
     */
    //不带全选的单选
    public static final String RPT_QUERY_COMPONENT_ONE = "21";
    //带全选的单选
    public static final String RPT_QUERY_COMPONENT_TWO = "22";
    //不带全选的多选
    public static final String RPT_QUERY_COMPONENT_THREE = "23";
    //带全选的多选
    public static final String RPT_QUERY_COMPONENT_FOUR = "24";
    //自定义控件（区域）
    public static final String RPT_QUERY_COMPONENT_FIVE = "25";
    //输入文本
    public static final String RPT_QUERY_COMPONENT_SIX = "26";
    //阀值查询
    public static final String RPT_QUERY_COMPONENT_SEVEN = "27";
    
    /*
     * redis缓存key
     */
    // 报表配置key(报表ID, 版本号)
    public static final String REDIS_KEY_REPORT_CONFIG = "REPORT_CONFIG_%s_%s";
    // 报表配置key(报表ID, 版本号)
    public static final String REDIS_KEY_REPORT_VERSION = "REPORT_DIM_VERSION_%s_%s";
    // 报表配置key(报表ID) 缓存报表版本号
    public static final String REDIS_KEY_REPORT_VERSION_VIEWNOTREL = "REPORT_LISTVER_%s_%s"; 
    // 报表查询sql(报表ID,版本号,用户id) 缓存报表查询sql
    public static final String REDIS_KEY_REPORT_SQL = "REPORT_SQL_%s_%s_%s"; 
    
    //表头类型
    public static final String RPT_HEAD_TYPE_TWO = "2";
    public static final String RPT_HEAD_TYPE_THREE = "3";
    /*
     * 字段类型
     */
    //时间
    public static final String COLUMN_TYPE_TIME = "0";
    public static final String COLUMN_TYPE_TIME_KEY = "key_0";
    //维度
    public static final String COLUMN_TYPE_DIM = "1";
    //指标
    public static final String COLUMN_TYPE_INDEX = "2";
    
    /*
     * 报表字段数据类型
     */
    public static final String DATA_TYPE_NUMBER = "1"; // 数字数据
    public static final String DATA_TYPE_STRING = "2"; // 字符串数据
    public static final String DATA_TYPE_DECIMAL = "3"; // 小数点型
    /*
     * 是否条件
     */
    public static final String QUERY_TRUE = "1";
    /*
     * 是否默认选中
     */
    public static final String CHECK_TRUE = "1";
    /*
     * 是否默认锁定
     */
    public static final String LOCK_TRUE = "1";
    /*
     * 是否关联其他维度
     */
    public static final String LINK_TRUE = "1";
    /*
     * 是否关注 1已关注 0未关注
     */
    public static final String ATTEN_TRUE = "1";
    public static final String ATTEN_FALSE = "0";
    
    /*
     * 字段操作 1指标下钻   2跳转页面  3清单下载
     */
    public static final String FIELD_URL = "2";
    public static final String FIELD_DETAIL = "3";
    
    /*
     * 报表字段 维度、指标
     */
    public static final int INDEX_COLUMN_TYPE_CODE=2;//指标
    public static final int DIM_DIM_SELECT=1;//维度
    /*
     * 灵动报表-查询维度配置表  读表
     */
    public static  String RPT_MASTER_TABLE_NAME = "td_rpt_report_info";// 
    public static  String RPT_TABLE_OTHER_NAME = "report_info";// 
   
    public static final int REPORT_STA_NOTREL = 0; // 报表未发布状态
    public static final int REPORT_STA_NORMAL = 1; // 报表正常状态
    public static final int REPORT_STA_SOONINVALID = 2; // 报表即将失效状态
    
    public static final int RULE_CFG_STA_NORMAL = 1; // 报表生命周期规则 生效状态

    /*
     * 报表业务口径
     */
    public static final int REPORT_CALIBER = 3; // 配置预失效天数,当前时间和失效时间之间天数
    /*
     * 指标正常状态 '1'
     */
    public static final String INDEX_STATE_NORMAL = "1"; 
    
    /*
     * 刷新规则正常状态 '1'
     */
    public static final String INDEX_RULE_CFG_STA_NORMAL = "1"; 
    /*
     * 指标即将失效状态
     */
    public static final String INDEX_STA_SOONINVALID = "2";
    /*
     * 超级PPT类型(1 — 暂存单  2 — 报告)
     */
    public static final String SUPER_PPT_REPORT_TYPE = "2";
    
    /*
     *  超级PPT获取报告ID的key值
     */
    public static final String SUPER_PPT_REPORT_ID_KEY = "superPPTReportId"; 
    
    /*
     *  超级PPT获取报告暂存ID的key值
     */
    public static final String SUPER_PPT_REPORT_SAVE_ID_KEY = "superPPTReportSaveId"; 
    /*
     * 超级PPT获取数据类型
     * 1 — 当前值x单位
     * 2 — 环比增幅x%(+x)
     * 3 — 同比增幅x%(+x)
     * 4 — 较昨日下降x
     * 5 — 占比x%
     * 6 — 双线趋势分析
     * 7 — 单线趋势分析
     */
    public static final String SUPER_PPT_DATA_TYPE_ONE = "1"; 
    public static final String SUPER_PPT_DATA_TYPE_TWO = "2"; 
    public static final String SUPER_PPT_DATA_TYPE_THREE = "3"; 
    public static final String SUPER_PPT_DATA_TYPE_FOUR = "4"; 
    public static final String SUPER_PPT_DATA_TYPE_FIVE = "5"; 
    public static final String SUPER_PPT_DATA_TYPE_SIX = "6"; 
    public static final String SUPER_PPT_DATA_TYPE_SEVEN = "7"; 
    
    /*
     * 超级PPT维度展示类型（级联维度）
     */
    public static final String SUPER_PPT_DIM_TYPE = "7"; 
    public static final String SUPER_PPT_DIM_NAME = "级联控件"; 
    
    
}
